
package org.example.controller;

import org.example.model.auto.Test;
import org.example.service.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangyinghao
 * @ClassName TestController
 * @Description
 * @Date 2021/6/23 下午12:41
 **/
@RestController
public class TestController {
    @Autowired
    private ITestService testService;

    @GetMapping("/testGetString")
    public String testGetString() {
        return "success";
    }

    @GetMapping("/getUser")
    public Test getUser() {
        return testService.getById(1);
    }
}